#include "ALPBRISK.h"

CALPBRISK::CALPBRISK()
{
}

CALPBRISK::CALPBRISK(CALStepItem* pStepItem)
{
	m_pStepItem = pStepItem;
}

CALPBRISK::~CALPBRISK()
{
}


void CALPBRISK::test()
{

}
void CALPBRISK::convert()
{
	if (m_pStepItem == NULL) return;

	try
	{
		CALSIPBRISK* pStepItem = (CALSIPBRISK*)m_pStepItem;

		int thresh = pStepItem->GetItemThreshold();
		int octaves = pStepItem->GetItemOctaves();
		float patternScale = pStepItem->GetItemPatternScale();

		//int thresh = 30;
		//int octaves = 3;
		//float patternScale = 1.0f;

		std::vector<KeyPoint> keyPoints;
		Ptr<BRISK> fast = BRISK::create(thresh, octaves, patternScale);
		fast->detect(m_srcMat, keyPoints);

		drawKeypoints(m_srcMat, keyPoints, m_dstMat, Scalar::all(255), DrawMatchesFlags::DEFAULT);

		SetDstType(AL_DST_Mat_One);
	}
	catch (...)
	{

	}
}

void CALPBRISK::convert(const Mat &src, Mat &dst)
{

}